<?php

//是否显示错误信息
$_CFG['system_display_errors'] = TRUE;
$_CFG['system_log_path']    = SYSPATH. 'data'. DS. 'log'. DS;

$_CFG['common_include_dir'] = array(SITEPATH, SYSPATH);

/**
 * WS::ERR 配置
 */
$_CFG['error_debug']        = 1; //是否开启调试模式
$_CFG['error_tpl_debug']    = 'tpl/debug.html'; //错误提示页面模板路径
$_CFG['error_temp_path']    = array(); //错误提示页面模板路径
$_CFG['error_type']         = array(); //错误类型
$_CFG['error_is_log']       = 0; //是否记录日志
$_CFG['error_is_send_mail'] = 0; //是否发送Email

/**
 * lib/loader.php
 */
$_CFG['loader_include_dir'] = $_CFG['common_include_dir'];
$_CFG['loader_mode'] = array(
    'api' => 3
);
$_CFG['loader_exception_files'] = array(
    'lib/base.php',
    'lib/loader.php'
);

/**
 * lib/router.php
 */
$_CFG['router_mode'] = array('normal', 'interface', 'rewrite');
$_CFG['router_entrance'] = array('root', 'admin', 'api', 'photo', 'static', 'visit');

//HTTP状态码
$_CFG['common_http_status_code'] = array(
    200 => 'OK',
    201 => 'Created',
    202 => 'Accepted',
    203 => 'Non-Authoritative Information',
    204 => 'No Content',
    205 => 'Reset Content',
    206 => 'Partial Content',
    300 => 'Multiple Choices',
    301 => 'Moved Permanently',
    302 => 'Found',
    304 => 'Not Modified',
    305 => 'Use Proxy',
    307 => 'Temporary Redirect',
    400 => 'Bad Request',
    401 => 'Unauthorized',
    403 => 'Forbidden',
    404 => 'Not Found',
    405 => 'Method Not Allowed',
    406 => 'Not Acceptable',
    407 => 'Proxy Authentication Required',
    408 => 'Request Timeout',
    409 => 'Conflict',
    410 => 'Gone',
    411 => 'Length Required',
    412 => 'Precondition Failed',
    413 => 'Request Entity Too Large',
    414 => 'Request-URI Too Long',
    415 => 'Unsupported Media Type',
    416 => 'Requested Range Not Satisfiable',
    417 => 'Expectation Failed',
    500 => 'Internal Server Error',
    501 => 'Not Implemented',
    502 => 'Bad Gateway',
    503 => 'Service Unavailable',
    504 => 'Gateway Timeout',
    505 => 'HTTP Version Not Supported'
);

//时区列表
$_CFG['common_select_timezone'] = array(
	'+12'	=> '(Etc/GMT -12:00) Eniwetok, Kwajalein',
	'+11'	=> '(Etc/GMT -11:00) Midway Island, Samoa',
	'+10'	=> '(Etc/GMT -10:00) Hawaii',
	'+9'	=> '(Etc/GMT -09:00) Alaska',
	'+8'	=> '(Etc/GMT -08:00) Pacific Time (US &amp; Canada), Tijuana',
	'+7'	=> '(Etc/GMT -07:00) Mountain Time (US &amp; Canada), Arizona',
	'+6'	=> '(Etc/GMT -06:00) Central Time (US &amp; Canada), Mexico City',
	'+5'	=> '(Etc/GMT -05:00) Eastern Time (US &amp; Canada), Bogota, Lima, Quito',
	'+4'	=> '(Etc/GMT -04:00) Atlantic Time (Canada), Caracas, La Paz',
	'+3.5'	=> '(Etc/GMT -03:30) Newfoundland',
	'+3'	=> '(Etc/GMT -03:00) Brassila, Buenos Aires, Georgetown, Falkland Is',
	'+2'	=> '(Etc/GMT -02:00) Mid-Atlantic, Ascension Is., St. Helena',
	'+1'	=> '(Etc/GMT -01:00) Azores, Cape Verde Islands',
	'+0'	=> '(Etc/GMT +00:00) Casablanca, Dublin, Edinburgh, London, Lisbon, Monrovia',
	'-1'	=> '(Etc/GMT +01:00) Amsterdam, Berlin, Brussels, Madrid, Paris, Rome',
	'-2'	=> '(Etc/GMT +02:00) Cairo, Helsinki, Kaliningrad, South Africa',
	'-3'	=> '(Etc/GMT +03:00) Baghdad, Riyadh, Moscow, Nairobi',
	'-3.5'	=> '(Etc/GMT +03:30) Tehran',
	'-4'	=> '(Etc/GMT +04:00) Abu Dhabi, Baku, Muscat, Tbilisi',
	'-4.5'	=> '(Etc/GMT +04:30) Kabul',
	'-5'	=> '(Etc/GMT +05:00) Ekaterinburg, Islamabad, Karachi, Tashkent',
	'-5.5'	=> '(Etc/GMT +05:30) Bombay, Calcutta, Madras, New Delhi',
	'-5.75'	=> '(Etc/GMT +05:45) Katmandu',
	'-6'	=> '(Etc/GMT +06:00) Almaty, Colombo, Dhaka, Novosibirsk',
	'-6.5'	=> '(Etc/GMT +06:30) Rangoon',
	'-7'	=> '(Etc/GMT +07:00) Bangkok, Hanoi, Jakarta',
	'-8'	=> '(Etc/GMT +08:00) Beijing, Hong Kong, Perth, Singapore, Taipei',
	'-9'	=> '(Etc/GMT +09:00) Osaka, Sapporo, Seoul, Tokyo, Yakutsk',
	'-9.5'	=> '(Etc/GMT +09:30) Adelaide, Darwin',
	'-10'	=> '(Etc/GMT +10:00) Canberra, Guam, Melbourne, Sydney, Vladivostok',
	'-11'	=> '(Etc/GMT +11:00) Magadan, New Caledonia, Solomon Islands',
	'-12'	=> '(Etc/GMT +12:00) Auckland, Wellington, Fiji, Marshall Island',
);
$_CFG['common_select_date_format'] = array(
	'Y-m-d' => date('Y', time()). '-'. date('m', time()). '-'. date('d', time()),
	'm/d/Y' => date('m', time()). '/'. date('d', time()). '/'. date('Y', time()),
	'd/m/Y' => date('d', time()). '/'. date('m', time()). '/'. date('Y', time()),
);
$_CFG['common_select_time_format'] = array(
	'H:i' 	=> date('H', time()). ':'. date('i', time()),
	'H:i:s' => date('H', time()). ':'. date('i', time()). ':'. date('s', time()),
);

$_CFG['common_mimes'] = array(
    'hqx'	=>	'application/mac-binhex40',
	'cpt'	=>	'application/mac-compactpro',
	'csv'	=>	array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel'),
	'bin'	=>	'application/macbinary',
	'dms'	=>	'application/octet-stream',
	'lha'	=>	'application/octet-stream',
	'lzh'	=>	'application/octet-stream',
	'exe'	=>	array('application/octet-stream', 'application/x-msdownload'),
	'class'	=>	'application/octet-stream',
	'psd'	=>	'application/x-photoshop',
	'so'	=>	'application/octet-stream',
	'sea'	=>	'application/octet-stream',
	'dll'	=>	'application/octet-stream',
	'oda'	=>	'application/oda',
	'pdf'	=>	array('application/pdf', 'application/x-download'),
	'ai'	=>	'application/postscript',
	'eps'	=>	'application/postscript',
	'ps'	=>	'application/postscript',
	'smi'	=>	'application/smil',
	'smil'	=>	'application/smil',
	'mif'	=>	'application/vnd.mif',
	'xls'	=>	array('application/excel', 'application/vnd.ms-excel', 'application/msexcel'),
	'ppt'	=>	array('application/powerpoint', 'application/vnd.ms-powerpoint'),
	'wbxml'	=>	'application/wbxml',
	'wmlc'	=>	'application/wmlc',
	'dcr'	=>	'application/x-director',
	'dir'	=>	'application/x-director',
	'dxr'	=>	'application/x-director',
	'dvi'	=>	'application/x-dvi',
	'gtar'	=>	'application/x-gtar',
	'gz'	=>	'application/x-gzip',
	'php'	=>	'application/x-httpd-php',
	'php4'	=>	'application/x-httpd-php',
	'php3'	=>	'application/x-httpd-php',
	'phtml'	=>	'application/x-httpd-php',
	'phps'	=>	'application/x-httpd-php-source',
	'js'	=>	'application/x-javascript',
	'swf'	=>	'application/x-shockwave-flash',
	'sit'	=>	'application/x-stuffit',
	'tar'	=>	'application/x-tar',
	'tgz'	=>	array('application/x-tar', 'application/x-gzip-compressed'),
	'xhtml'	=>	'application/xhtml+xml',
	'xht'	=>	'application/xhtml+xml',
	'zip'	=>  array('application/x-zip', 'application/zip', 'application/x-zip-compressed'),
	'mid'	=>	'audio/midi',
	'midi'	=>	'audio/midi',
	'mpga'	=>	'audio/mpeg',
	'mp2'	=>	'audio/mpeg',
	'mp3'	=>	array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'),
	'aif'	=>	'audio/x-aiff',
	'aiff'	=>	'audio/x-aiff',
	'aifc'	=>	'audio/x-aiff',
	'ram'	=>	'audio/x-pn-realaudio',
	'rm'	=>	'audio/x-pn-realaudio',
	'rpm'	=>	'audio/x-pn-realaudio-plugin',
	'ra'	=>	'audio/x-realaudio',
	'rv'	=>	'video/vnd.rn-realvideo',
	'wav'	=>	'audio/x-wav',
	'bmp'	=>	'image/bmp',
	'gif'	=>	'image/gif',
	'jpeg'	=>	array('image/jpeg', 'image/pjpeg'),
	'jpg'	=>	array('image/jpeg', 'image/pjpeg'),
	'jpe'	=>	array('image/jpeg', 'image/pjpeg'),
	'png'	=>	array('image/png',  'image/x-png'),
	'tiff'	=>	'image/tiff',
	'tif'	=>	'image/tiff',
	'css'	=>	'text/css',
	'html'	=>	'text/html',
	'htm'	=>	'text/html',
	'shtml'	=>	'text/html',
	'txt'	=>	'text/plain',
	'text'	=>	'text/plain',
	'log'	=>	array('text/plain', 'text/x-log'),
	'rtx'	=>	'text/richtext',
	'rtf'	=>	'text/rtf',
	'xml'	=>	'text/xml',
	'xsl'	=>	'text/xml',
	'mpeg'	=>	'video/mpeg',
	'mpg'	=>	'video/mpeg',
	'mpe'	=>	'video/mpeg',
	'qt'	=>	'video/quicktime',
	'mov'	=>	'video/quicktime',
	'avi'	=>	'video/x-msvideo',
	'movie'	=>	'video/x-sgi-movie',
	'doc'	=>	'application/msword',
	'docx'	=>	'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
	'xlsx'	=>	'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
	'word'	=>	array('application/msword', 'application/octet-stream'),
	'xl'	=>	'application/excel',
	'eml'	=>	'message/rfc822',
	'json' => array('application/json', 'text/json')
);

